<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/1/21
 * Time: 11:11
 */

namespace App\Http\Traits;


use Illuminate\Http\Request;

trait OrderTrait
{
    use BaseTrait;

    // 验证秘钥
    protected $loginSession;
    // 购物车ID字符串
    protected $cart_id_str;
    // 订单ID
    protected $order_id;
    // 地址ID
    protected $address_id;
    // 订单状态
    protected $status;
    // 分页大小
    protected $limit;
    // 快递单号
    protected $courier_number;
    // 商品ID
    protected $goods_id;
    // 商品数量
    protected $num;
    // 咖啡馆ID
    protected $cafe_id;
    // 合作者ID
    protected $partner_id;

    public function __construct(Request $request)
    {
        errorLog(postData());
        $this->loginSession = $request->input('loginSession', '');
        $this->cart_id_str = $request->input('cart_id_str', '');
        $this->order_id = $request->input('order_id', 0);
        $this->address_id = $request->input('address_id', 0);
        $this->status = $request->input('status', 0);
        $this->limit = $request->input('limit', 0);
        $this->courier_number = $request->input('courier_number', '');
        $this->goods_id = $request->input('goods_id', 0);
        $this->num = $request->input('num', 0);
        $this->cafe_id = $request->input('cafe_id', 0);
        $this->partner_id = $request->input('partner_id', 0);
    }
}